package com.logic.landseaserver.persistence.read;

import java.util.List;
import java.util.Map;

import com.logic.common.util.QueryUtil;
import com.logic.landseaserver.domain.Room;
import com.logic.landseaserver.domain.RoomType;
import com.logic.landseaserver.domain.SystemCode;
import com.logic.landseaserver.models.ddlock.bean.SmsRoomInfo;
import com.logic.landseaserver.models.rental.bean.RoomDataBase;
import com.logic.landseaserver.models.rentalrate.bean.RentalRateRoom;
import com.logic.landseaserver.ws.dto.ProjectAppartmentDTO;
import com.logic.landseaserver.ws.dto.RoomDTO;
import com.logic.landseaserver.ws.dto.RoomTypeDTO;
import com.logic.landseaserver.ws.request.RoomStatusListReq;
import com.logic.landseaserver.ws.request.RoomStatusStatisticReq;
import com.logic.landseaserver.ws.response.RoomDetailResp;
import com.logic.landseaserver.ws.response.RoomResp;
import com.logic.landseaserver.ws.response.RoomStatisticListResp;

public interface RoomReadMapper {

    Room selectByPrimaryKey(Integer id);

    List<Object> selectByPage(QueryUtil queryUtil);

    List<RoomDetailResp> roomInfo(int id);

    List<SystemCode> searchRoomStatusList();

    List<SystemCode> searchRoomAppendStatusList();

    List<SystemCode> roomTypeByProjectID(int id);

    List<SystemCode> searchRoomTypeList();

    List<SystemCode> searchDecorateStyleByProjectID(int id);

    RoomType getDecoratePic(Integer id);

    Integer getMaxRoomCode(int projectId);

    List<RoomTypeDTO> getRoomTypeList(QueryUtil queryUtil);

    Integer ChackRoomTypeExist(RoomType roomType);

    List<SystemCode> searchValidateDecorateStyle(int id);

    List<ProjectAppartmentDTO> selectByPrjId(Integer projectId);

    Room selectRoomInfo(int id);

    Room selectAprtIdByAppend(Room room);

    Room selectRoomDTO(Integer id);

    //房态图
    List<RoomDTO> selectRoomPage(RoomStatusListReq req);

    List<RoomStatisticListResp> roomStatistic(RoomStatusStatisticReq req);

    /**
     * [简要描述]：查询项目下所有房间数</br>
     * [详细描述]：</br>
     * [作者]：Aaron(2017-06-30)</br>
     *
     * @param projectId 项目ID
     * @return 数量
     */
    Integer selectProjectRoomCount(Integer projectId);

    //统计脏房数量
    Integer roomDirtyStatistic(RoomStatusStatisticReq req);

    //统计欠费数量
    Integer roomArrearsStatistic(RoomStatusStatisticReq req);

    //统计退租数量
    Integer roomOffRentStatistic(RoomStatusStatisticReq req);

    RoomDTO getAppendInfo(Integer id);

    //统计签约未入住的数量
    Integer roomNosigninStatistic(RoomStatusStatisticReq req);

    //统计门锁异常
    Integer roomlockWarning(RoomStatusStatisticReq req);

    //统计系统底价均价
    Double roomSystemFloorPrice(RoomStatusStatisticReq req);

    //统计实际均价
    Double roomRealFloorPrice(RoomStatusStatisticReq req);
    
    // 发送短信，查询房间号、门店名称
    SmsRoomInfo querySmsRoomInfo(Integer roomId);

    List<RoomResp> getEffectiveRoom(Integer userId, Integer prjId);

    List<RoomResp> getEffectiveRoomForAdmin(String phone, Integer prjId);

    /**
     * 
     * [简要描述]：集中式房源信息获取</br>
     * [详细描述]：获取房间信息</br>
     * [作者]：Crystal(2018-03-05)</br>
     *
     * @param 
     * @return
     *
     */
	List<RoomDataBase> selectForYingShi(String time);

    //统计distinct预定签约未入住
    Integer roomDistSignAndDeposit(RoomStatusStatisticReq req);
    
    // 查询要统计出租率的房间总数,根据时间、城市公司、项目
    List<RentalRateRoom> queryRentalRateRoom(Map<String,Object> queryMap);
}